$(function () {
    window.onload = function () {
        $('.dh').children().mouseenter(function () {
            $(".navigation").children().children().children().eq(1).css('color', 'red')
        })
        $('.dh').children().mouseleave(function () {
            $(".navigation").children().children().children().eq(1).css('color', '')
        })
        $.ajax({
            url: 'http://localhost:3000/play/new',
            methode: 'get',
            success: function (res) {
                var str = '';
                $.each(res, function (index, item) {
                    $.each(item, function (dex, txt) {
                        console.log(txt);
                        str += "<li>" +
                            "<div>" +
                            "<img src=" + txt.img + ">" +
                            "<p class=p>" + txt.text + "</P>" +
                            "<div class=div1>" + txt.price + "<span class=span><img src=../tubiao/zan.png>" + txt.like + "</span><span><img src=../tubiao/reply.png>" + txt.words
                            + "</div>" +
                            "</div>"
                        $('.kw-zx').children().html(str);
                    })

                })

            }
        })
    }
    $('.dh').children().mouseenter(function () {
        $(this).css('border-bottom', '3px solid red').show();
        $(this).children().css('color', 'red')

    })
    $('.dh').children().mouseleave(function () {
        $(this).css('border-bottom', 'none');
        $(this).children().css('color', '');

    })
})